/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Enum.java to edit this template
 */
package org.flower.httprc.http;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author ZhuYanXin
 */
public enum HttpMethod {
    OPTIONS("OPTIONS"),
    GET("GET"),
    HEAD("HEAD"),
    POST("POST"),
    MULTIPART("MULTIPART"),
    PUT("PUT"),
    DELETE("DELETE"),
    TRACE("TRACE");

    private final String value;

    HttpMethod(String value) {
        this.value = value;
    }

    public String value() {
        return value;
    }

    public static String[] getValues() {
        HttpMethod[] values = HttpMethod.values();
        List<String> list = new ArrayList<>();
        for (HttpMethod method : values) {
            list.add(method.value());
        }
        return list.toArray(String[]::new);
    }
}
